﻿using System.Collections.Generic;
using System.Web.Mvc;

namespace Zhang.DeskTop.Controllers.Notes
{
    public class NotesController : BaseController
    {
        // GET:笔记
        public ActionResult Index(Model.UCenter.NotesSch schModel=null, int pg = 1)
        {
            int pgCount;
            PageIndex = pg;
            PageSize = 10;
            var model = new BLL.UCenter.Notes.Notes().SelectList(PageSize, PageIndex, schModel);
            TotalRecord = model.Item2;
            pgCount = TotalRecord / PageSize;
            pgCount = pgCount * PageSize < TotalRecord ? pgCount + 1 : pgCount;


            if (TotalRecord > PageSize)
            {

                ViewBag.HtmlCode = Utils.SplitPage.GetHtmlCode("/Notes/", 6, PageIndex, PageSize, TotalRecord, Utils.SplitStaticPage.EnTemplateHtmlCodeWithoutTotal);
            }
            return View(model.Item1);
        }
      
    }
}